package Command;

import Factory.AgriculturalMachine;

// 具体命令 - 执行任务命令
public class ExecuteTaskCommand implements MachineCommand {
    private AgriculturalMachine machine;

    public ExecuteTaskCommand(AgriculturalMachine machine) {
        this.machine = machine;
    }

    @Override
    public void execute() {
        machine.executeTask();
    }

    @Override
    public void undo() {
        System.out.println("Undoing task execution...");
        // 实现撤销逻辑
    }
}
